
import axios from '@/utils/request.js'
import qs from 'qs'; 

// 页面登录
// export const loginApi = data => post('/oauth/token', data);

const companyApi = {    
  // //获取司机列表
  companyList (data) {
    return axios.get('/drivers?field=lastModifiedTime&order=DESC',{params:data})
  },
  // 新增司机
  addDrivers (params) {
    return axios.post('/drivers',params)
  },
  // 修改司机信息
  editDrivers (params,id) {
    return axios.put(`/drivers/${id}`,params)
    
  },
  // 获取司机信息
  driversInfo (params) {
    return axios.get(`/drivers/${params}`)
  },
  // 列表页提交司机信息
  subDriInfo (id,data) {
    return axios.post(`/drivers/${id}`,data)
  },
  // 列表页获取司机验证码
  yzCode (id){
    return axios.post(`/drivers/${id}/verification`)
  },

  // 列表页重新邀请签约
  invite (id,data){
    return axios.post(`/drivers/${id}/contract`,data)
  },




  // 图片上传
  uploadImg (params) {
    return axios.post('/files/upload',params)
  },

  //获取车辆列表
  truckeList (data) {
    return axios.get('/trucks?field=lastModifiedTime&order=DESC',{params:data})
  },
  //新增车辆
  addTrucks (data) {
    return axios.post('/trucks',data)
  },
  //修改车辆
  editTrucks (params,id) {
    return axios.put(`/trucks/${id}`,params)
  },
   //获取车辆信息
   trucksInfo (params) {
    return axios.get(`/trucks/${params}`)
  },

   //获取车辆全部列表
   trucksAllList () {
    return axios.get('/trucks/list')
  },

  //列表页提交车辆信息
  submitTrucks (id){
    return axios.post(`/trucks/${id}`)
  },





  // 获取发票抬头信息
  companyInvoice () {
    return axios.get('/company_invoice')
  },
  // 修改发票抬头信息
  companyEditInvoice (params) {
    return axios.put('/company_invoice',params)
  },
  // 获取邮寄信息
  companyPost () {
    return axios.get('/company_operation')
  },
  // 修改邮寄信息
  companyEditPost (params) {
    return axios.put('/company_operation',params)
  },



 

}
export default companyApi;
